package de.baumann.browser.adapter;

import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import de.baumann.browser.OdinGlideModule;
import de.baumann.browser.R;
import de.baumann.browser.api.net.vo.PacketDetail;

public class SendRecordAdapter extends BaseQuickAdapter<PacketDetail.ListEntity,BaseViewHolder> {

    public SendRecordAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper, PacketDetail.ListEntity item) {
         ImageView head =  helper.getView(R.id.ivItemHead);
        OdinGlideModule.loadWithCropAndCircle(mContext,item.getAvatar(),head,R.drawable.icon_head);
        helper.setText(R.id.tvItemName,item.getUserName());
        helper.setText(R.id.tvItemTime,item.getReDate());
        helper.setText(R.id.tvItemAmount,String.valueOf(item.getAmount()));
    }
}
